package com.bsoft.gol.hcb.service.docteam.service;


import com.bsoft.gol.hcb.service.docteam.bean.qo.AddDocTeamFusAuthorityReq;
import com.bsoft.gol.hcb.service.docteam.bean.qo.AddDocTeamMemberReq;
import com.bsoft.gol.hcb.service.docteam.bean.qo.AddDocTeamReq;
import com.bsoft.gol.hcb.service.docteam.bean.qo.AddTeamChronicDiseaseListReq;
import com.github.pagehelper.PageInfo;
import ctd.controller.exception.ControllerException;
import ctd.util.annotation.RpcService;
import hcn.bean.specialist.qo.*;
import hcn.bean.specialist.vo.QuerySurveyRuleQuestionListVO;
import hcn.docteam.DocTeamEntity;
import hcn.specialist.DocTeamDiseaseEntity;
import hcn.specialist.DocTeamFusAuthority;
import hcn.bean.specialist.vo.QueryDocTeamDetailResp;
import hcn.bean.specialist.vo.QueryDocTeamListResp;
import pcn.bean.docTeam.QueryAllDocTeamReq;

import java.util.List;

public interface ITeamManageService {
    /*查询团队列表*/
    @RpcService
    PageInfo queryDocTeamList(QueryDocTeamListReq docTeamListReq) throws ControllerException;

    /*通过医生id查询团队列表*/
    @RpcService
    List<QueryDocTeamListResp> queryDocTeamByDocidList(QueryDocTeamListReq docTeamListReq) throws ControllerException;


    /*查询医疗团队详情*/
    @RpcService
    QueryDocTeamDetailResp queryDocTeamDetail(QueryDocTeamListReq docTeamListReq) throws ControllerException;

    /*查询医疗成员详情*/
    @RpcService
    QueryDocTeamDetailResp queryDocTeamMemberDetail(QueryDocTeamListReq docTeamListReq) throws ControllerException;

    /*新增（修改）医疗团队*/
    @RpcService
    DocTeamEntity addDocTeam(AddDocTeamReq addDocTeamReq) throws ControllerException;

    /*新增（修改）医疗团队疾病列表*/
    @RpcService
    void addTeamChronicDiseaseList(AddTeamChronicDiseaseListReq addTeamChronicDiseaseListReq) throws ControllerException;

    /*没有团队id，从redis缓存查询团队疾病列表，用于团队未保存时的初始化疾病列表;有团队id，直接返回团队病种列表*/
    @RpcService
    List<DocTeamDiseaseEntity> queryTeamChronicDiseaseList(QueryTeamChronicDiseaseListReq queryTeamChronicDiseaseListReq) throws ControllerException;

    /*删除团队疾病列表*/
    @RpcService
    void delTeamChronicDiseaseList(QueryTeamChronicDiseaseListReq queryTeamChronicDiseaseListReq) throws ControllerException;

    /*删除医疗团队*/
    @RpcService
    void delDocTeam(QueryDocTeamListReq docTeamListReq) throws ControllerException;

    /*保存（新增）团队成员*/
    @RpcService
    void addDocTeamMembers(AddDocTeamMemberReq addDocTeamReq) throws ControllerException;

    /*删除团队成员*/
    @RpcService
    void delDocTeamMember(QueryDocTeamListReq docTeamListReq) throws ControllerException;

    /*设置团队成员角色*/
    @RpcService
    String setDocTeamMemberRole(SetMemberRoleReq setMemberRoleReq) throws ControllerException;

    /*获取慢病列表*/
    @RpcService
    List<DocTeamDiseaseEntity> queryChronicDiseaseList(QueryDocTeamListReq docTeamListReq) throws ControllerException;

    /*获取当前医生团队的问卷列表*/
    @RpcService
    QuerySurveyRuleQuestionListVO querySurveyRuleByDoctorId(QuerySurveyRuleListRequest req) throws ControllerException;

    @RpcService
    List<DocTeamEntity> queryAllDocTeam(QueryAllDocTeamReq req) throws ControllerException;

    /*查询该团队拥有的随访路径权限列表(新增)*/
    @RpcService
    List<DocTeamFusAuthority> queryTeamFusList(AddDocTeamFusAuthorityReq addDocTeamFusAuthorityReq) throws ControllerException;

    /**/
    @RpcService
    void addTeamFusList(AddDocTeamFusAuthorityListReq addDocTeamFusAuthorityListReq) throws ControllerException;

    /**/
    @RpcService
    public List<DocTeamFusAuthority> queryTeamList(QueryDocTeamFusAuthorityListReq queryDocTeamFusAuthorityListReq) throws ControllerException;


    /*删除团队路径列表*/
    @RpcService
    void delTeamFusList(DelDocTemFusReq delDocTemFusReq) throws ControllerException;


    /**
     * 根据病种id查询团队列表
     *
     * @param diseaseTypeId 病种id
     * @return 团队列表
     * @throws ControllerException
     */
    @RpcService
    List<QueryDocTeamListResp> queryByDiseaseTypeId(Long diseaseTypeId) throws ControllerException;

    /**
     * 根据病种id查询团队列表
     *
     * @param routeId 随访路径id
     * @return 团队列表
     * @throws ControllerException
     */
    @RpcService
    List<QueryDocTeamListResp> queryByRouteId(Long routeId) throws ControllerException;
}
